package awk.datastruct;

/**
 * created with IDEA
 *
 * @author haifeng.wang
 * @since 2019-07-02-17:04
 */
/**
 * Title: 结点类
 * 链表的基本元素
 * created with IDEA
 *
 * @author haifeng.wang
 * @since 2019-07-02-17:04
 */
public class Node<T> {
    public Node<T> next;
    public T data;

    public Node(T data) {
        this.data = data;
    }

    public T getData() {
        return data;
    }

    @Override
    public String toString() {
        return data.toString();
    }

    public Node<T> getNext() {
        return next;
    }

}
